package com.lnt.java.thread.threadvsexecutor;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class RunnableTaskDemo implements Runnable{

    private List<Integer> list;

    private Random number;

    public RunnableTaskDemo (List<Integer> list, Random number) {
        this.list = list;
        this.number = number;
    }

    @Override
    public void run() {
        list.add(number.nextInt());
    }
}
